package com.example.minademo.entity;


public class ResultData {

    public int code;
    public String msg;
    public Object data;

    //返回错误信息
    public static ResultData error(String msg , int code ){
        ResultData data = new ResultData();
        data.msg = msg;
        data.code = code;
        return data;
    }

    //返回成功
    public static ResultData success(String msg, Object data){
        ResultData d = new ResultData();
        d.code = ErrorCode.OK;
        d.msg = msg;
        d.data = data;
        return d;
    }

}
